package com.ruoyi.project.park.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.park.mapper.BizFeeRecordMapper;
import com.ruoyi.project.park.domain.BizFeeRecord;
import com.ruoyi.project.park.service.IBizFeeRecordService;

/**
 * 停车收费记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-08
 */
@Service
public class BizFeeRecordServiceImpl implements IBizFeeRecordService 
{
    @Autowired
    private BizFeeRecordMapper bizFeeRecordMapper;

    /**
     * 查询停车收费记录
     * 
     * @param feeRecordId 停车收费记录主键
     * @return 停车收费记录
     */
    @Override
    public BizFeeRecord selectBizFeeRecordByFeeRecordId(Long feeRecordId)
    {
        return bizFeeRecordMapper.selectBizFeeRecordByFeeRecordId(feeRecordId);
    }

    /**
     * 查询停车收费记录列表
     * 
     * @param bizFeeRecord 停车收费记录
     * @return 停车收费记录
     */
    @Override
    public List<BizFeeRecord> selectBizFeeRecordList(BizFeeRecord bizFeeRecord)
    {
        return bizFeeRecordMapper.selectBizFeeRecordList(bizFeeRecord);
    }

    /**
     * 新增停车收费记录
     * 
     * @param bizFeeRecord 停车收费记录
     * @return 结果
     */
    @Override
    public int insertBizFeeRecord(BizFeeRecord bizFeeRecord)
    {

        bizFeeRecord.setCreateTime(DateUtils.getNowDate());
        System.out.println("bizFeeRecord");
        System.out.println(bizFeeRecord);
        return bizFeeRecordMapper.insertBizFeeRecord(bizFeeRecord);
    }

    /**
     * 修改停车收费记录
     * 
     * @param bizFeeRecord 停车收费记录
     * @return 结果
     */
    @Override
    public int updateBizFeeRecord(BizFeeRecord bizFeeRecord)
    {
        bizFeeRecord.setUpdateTime(DateUtils.getNowDate());
        return bizFeeRecordMapper.updateBizFeeRecord(bizFeeRecord);
    }

    /**
     * 批量删除停车收费记录
     * 
     * @param feeRecordIds 需要删除的停车收费记录主键
     * @return 结果
     */
    @Override
    public int deleteBizFeeRecordByFeeRecordIds(Long[] feeRecordIds)
    {
        return bizFeeRecordMapper.deleteBizFeeRecordByFeeRecordIds(feeRecordIds);
    }

    /**
     * 删除停车收费记录信息
     * 
     * @param feeRecordId 停车收费记录主键
     * @return 结果
     */
    @Override
    public int deleteBizFeeRecordByFeeRecordId(Long feeRecordId)
    {
        return bizFeeRecordMapper.deleteBizFeeRecordByFeeRecordId(feeRecordId);
    }
}
